package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.AirPollutionDto;
import com.leadingsoft.pwxk.model.AirPollution;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class AirPollutionConverter extends AbstractConverter<AirPollution, AirPollutionDto> {

	@Autowired
	private DrainBaseInfoConverter drainBaseInfoConverter;
	@Autowired
	private DrainNormConverter drainNormConverter;

	@Override
	protected AirPollutionDto toDtoActual(AirPollution model) {
		// TODO Auto-generated method stub

		AirPollutionDto dto = new AirPollutionDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setDrainBaseInfoList(drainBaseInfoConverter.toDto(model.getDrainBaseInfoList()));
		dto.setDrainNormList(drainNormConverter.toDto(model.getDrainNormList()));
		return dto;
	}

	public void copyProperties(AirPollution model, AirPollutionDto dto) {
		// model.setId(dto.getId());
		// model.setDataid(dto.getDataid());
	}

}
